package com.bookmanager.www.entity;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@PropertySource("classpath:/alipay.properties")
@ConfigurationProperties(prefix = "alipay")
public class AliPayBean {
//    private String appId="2021000118629277";
//    private String privateKey="MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCcknqqdtofV0BPHLs6MO53Bz3AAzvWNoSW5coL5HweG64yy7z3bsYIYjoWJrfZP5pVC/cBD9ONwiUoywSV3fMt3nRYAiCEzajovmJO7aMHJ/a+znP0Vm88LINuwHjG38T3e8R8NLt7fRtKK8YE7F0rSp5WLut6/Re4i2EeRyv9l3OoymTjeDe9p+JESfDSTawaJcBqQ+tNWEo6l4VWzNokeHEkPrKPvMk/T2HZA964HcRIkNL+NxZJHj2XMLtDhAj9LSSbemj+lOMfoeMZqiI/1SD73800gkBOoN2dBkyvFvNOb/1YynG6z+OJzvqetfsyZTkrq/mBC4q5Yw859L6fAgMBAAECggEAaZjA8kbGRWzrCnAuNcjai5xuoRmNOaP7OGoyImMu8n9otQmDoL0tAmp9EoN6ayLiS4mORUEPRQQzW5fQt+LBJ6ZogRKuK+MokBAW7XSIB0OEvpsuyROiYcsDuaZFzpsMlHz8v2gxKc/un8919cwT6iahMy7h0kjvvp8CGRGXMafq7MF2ry0wSq0saT/IN/ryoZX1b+8MoSha+MLa0CIjl8zBV2lVSjSAWPPX66P8ORyl/1a1QfrJ8RuswgHJdXQpuk8FuebYIfFeIvcllUP2qPbN65KEmTJnL+9dmi2zZI80qKn2YDk5idXnh1IlvF6KEO0p+HyZAYIg/BPAGiTRwQKBgQDlJNu7D5rVfhNJAfbffOJzdmukDhiJYxzLU4qERoSKF5+E0ZCQhbXJl7Pht4sE8Ppj20sN3ZR57EJ3sJETk67hNEeWduP/MK6sz568ANU6xDy6kv2CiVGvEK+CGzFnGJc0dees2XoAR+xMQFV6kAUhM07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ThAc2FuZGJveC5jb20xDzANBgNVBAsMBkFsaXBheTFDMEEGA1UEAww65pSv5LuY5a6dKOS4reWbvSnnvZHnu5zmioDmnK/mnInpmZDlhazlj7gtMjA4ODYyMTk1NjU0MDM4NzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3UNhcN7/UW0nCnTfOfzShBQNrgSWmMLY0PLwp3YX/5++ZKhGA9mNoNxHjayTgmx217VmdsyyeDvHTqrjKxCSsqZyfAC4rRoGhjVZDpzF6iamC672lAN2osMPIrx/n1MrZ/YufydyEfmwXMLjqoclNaFLsY/9saqryx5XCg56eMj6xoYEnZIWzGfO/YHp+ZfCOYbfkul3ql2mVBNk8mEiCcNfTP7YQp/1hPmij7l8nf2JhU5r4Zu3fa7og2b9a1SSrWBcgTEwUesO8tJwGw10+iLw52CwfaF6I4aCG1v4dh78wrxjS2tHDZRPuJmOIHmTKXXnjbCE6TNUgCcFLvnjUCAwEAAaMSMBAwDgYDVR0PAQH/BAQDAgTwMA0GCSqGSIb3DQEBCwUAA4IBAQCDvW+jaa/w0Usl3UtK1Zf6bw2DoetLVXFOyz6ZaKKMZ3MJeN6G1IJ56G+1qgkDgd6REfBhGBqrXPppHkaQ3RlGS9p14qLd9KpXKflLcd/F5OKYw5qTK+Po0QMwr01EVLY4bTjt749cQKmQl/1GF0V77YEVy2gXWLoghJww7twuGgL4dK1T6nZ7RjF5z3cjYaBceTDuMDw4+mOSkOB3SBah1byKryU5WocWlbmWYMkLUO2V12ZtV2XFK2/vcPIZMs+HzkQ+lcR6+k2Bs8ID+oHUVxnEDWHEqIal1DC0kxiiDn3JCWuDeCFQnRcq6zyd0KzApQasIMd9BfRRburJxNa6";
//    private String appCertPath="E:/study/bookManager/src/main/resources/dev/appCertPublicKey_2021000118629277.crt";
//    private String aliPayCertPath="E:/study/bookManager/src/main/resources/dev/alipayCertPublicKey_RSA2.crt";
//    private String aliPayRootCertPath="E:/study/bookManager/src/main/resources/dev/alipayRootCert (1).crt";


    private String appId;
    private String privateKey;
    private String publicKey;
    private String appCertPath;
    private String aliPayCertPath;
    private String aliPayRootCertPath;

    private String serverUrl;
    private String domain;
    @Value("${alipay.cert_file_path}")
    private String cert_file_path;

    public String getCert_file_path() {
        return cert_file_path;
    }

    public void setCert_file_path(String cert_file_path) {
        this.cert_file_path = cert_file_path;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getPrivateKey() {
        return privateKey;
    }

    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }

    public String getPublicKey() {
        return publicKey;
    }

    public void setPublicKey(String publicKey) {
        this.publicKey = publicKey;
    }

    public String getAppCertPath() {
        return appCertPath;
    }

    public void setAppCertPath(String appCertPath) {
        this.appCertPath = appCertPath;
    }

    public String getAliPayCertPath() {
        return aliPayCertPath;
    }

    public void setAliPayCertPath(String aliPayCertPath) {
        this.aliPayCertPath = aliPayCertPath;
    }

    public String getAliPayRootCertPath() {
        return aliPayRootCertPath;
    }

    public void setAliPayRootCertPath(String aliPayRootCertPath) {
        this.aliPayRootCertPath = aliPayRootCertPath;
    }

    public String getServerUrl() {
        return serverUrl;
    }

    public void setServerUrl(String serverUrl) {
        this.serverUrl = serverUrl;
    }


    public String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

    @Override
    public String toString() {
        return "AliPayBean{" +
                "appId='" + appId + '\'' +
                ", privateKey='" + privateKey + '\'' +
                ", publicKey='" + publicKey + '\'' +
                ", appCertPath='" + appCertPath + '\'' +
                ", aliPayCertPath='" + aliPayCertPath + '\'' +
                ", aliPayRootCertPath='" + aliPayRootCertPath + '\'' +
                ", serverUrl='" + serverUrl + '\'' +
                ", domain='" + domain + '\'' +
                '}';
    }
}